package com.yincheng.oes.business.exam.export.analysispaper.entity;

import org.apache.commons.collections4.CollectionUtils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * 测评分析报告实体类
 *
 * @author yangsy
 *
 */
public class AnalysisResult {

    private String paperName;
    private String score1;
    private String score2;
    private String studentName;
    private String imgUrl;
    private String subjectName;
    private String countryAvg;
    private String reviseScore;
    private String increaseRate;// 出科相对于入科增长率
    private String compareRate;// 出科相对于修正增长率
    private String assistantName;//助教姓名

    private String year;
    private String month;
    private String day;

    private List<AnalysisKnowledge> knowleges1;
    private List<AnalysisKnowledge> knowleges2;
    private List<AnalysisKnowledge> knowleges3;

    private List<AnalysisQuestionWrapper> question1;
    private List<AnalysisQuestionWrapper> question2;
    private List<AnalysisQuestionWrapper> question3;

    private List<List<ReferAnswer>> answers1;
    private List<List<ReferAnswer>> answers2;
    private List<List<ReferAnswer>> answers3;

    public String getAssistantName() {
        return assistantName;
    }

    public void setAssistantName(String assistantName) {
        this.assistantName = assistantName;
    }

    public String getIncreaseRate() {
        return increaseRate;
    }

    public void setIncreaseRate(String increaseRate) {
        this.increaseRate = increaseRate;
    }

    public String getCompareRate() {
        return compareRate;
    }

    public void setCompareRate(String compareRate) {
        this.compareRate = compareRate;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getCountryAvg() {
        return countryAvg;
    }

    public void setCountryAvg(String countryAvg) {
        this.countryAvg = countryAvg;
    }

    public String getReviseScore() {
        return reviseScore;
    }

    public void setReviseScore(String reviseScore) {
        this.reviseScore = reviseScore;
    }

    public String getYear() {
        String[] formats = splitAndGetDate();
        return formats[0];
    }

    public String[] splitAndGetDate() {
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String format = sdf.format(date);
        return format.split("-");
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getMonth() {
        String[] formats = splitAndGetDate();
        return formats[1];
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getDay() {
        String[] formats = splitAndGetDate();
        return formats[2];
    }

    public void setDay(String day) {
        this.day = day;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getPaperName() {
        return paperName;
    }

    public void setPaperName(String paperName) {
        this.paperName = paperName;
    }

    public String getScore1() {
        return score1;
    }

    public void setScore1(String score1) {
        this.score1 = score1;
    }

    public String getScore2() {
        return score2;
    }

    public void setScore2(String score2) {
        this.score2 = score2;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public List<AnalysisKnowledge> getKnowleges1() {
        if (CollectionUtils.isEmpty(knowleges1)) {
            return null;
        }
        return knowleges1;
    }

    public void setKnowleges1(List<AnalysisKnowledge> knowleges1) {
        this.knowleges1 = knowleges1;
    }

    public List<AnalysisKnowledge> getKnowleges2() {
        if (CollectionUtils.isEmpty(knowleges2)) {
            return null;
        }
        return knowleges2;
    }

    public void setKnowleges2(List<AnalysisKnowledge> knowleges2) {
        this.knowleges2 = knowleges2;
    }

    public List<AnalysisKnowledge> getKnowleges3() {
        if (CollectionUtils.isEmpty(knowleges3)) {
            return null;
        }
        return knowleges3;
    }

    public void setKnowleges3(List<AnalysisKnowledge> knowleges3) {
        this.knowleges3 = knowleges3;
    }

    public List<AnalysisQuestionWrapper> getQuestion1() {
        if (CollectionUtils.isEmpty(question1)) {
            return null;
        }
        return question1;
    }

    public void setQuestion1(List<AnalysisQuestionWrapper> question1) {
        this.question1 = question1;
    }

    public List<AnalysisQuestionWrapper> getQuestion2() {
        if (CollectionUtils.isEmpty(question2)) {
            return null;
        }
        return question2;
    }

    public void setQuestion2(List<AnalysisQuestionWrapper> question2) {
        this.question2 = question2;
    }

    public List<AnalysisQuestionWrapper> getQuestion3() {
        if (CollectionUtils.isEmpty(question3)) {
            return null;
        }
        return question3;
    }

    public void setQuestion3(List<AnalysisQuestionWrapper> question3) {
        this.question3 = question3;
    }

    public List<List<ReferAnswer>> getAnswers1() {
        if (CollectionUtils.isEmpty(answers1)) {
            return null;
        }
        return answers1;
    }

    public void setAnswers1(List<List<ReferAnswer>> answers1) {
        this.answers1 = answers1;
    }

    public List<List<ReferAnswer>> getAnswers2() {
        if (CollectionUtils.isEmpty(answers2)) {
            return null;
        }
        return answers2;
    }

    public void setAnswers2(List<List<ReferAnswer>> answers2) {
        this.answers2 = answers2;
    }

    public List<List<ReferAnswer>> getAnswers3() {
        if (CollectionUtils.isEmpty(answers3)) {
            return null;
        }
        return answers3;
    }

    public void setAnswers3(List<List<ReferAnswer>> answers3) {
        this.answers3 = answers3;
    }
}
